<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?=config_item('my_title')?></title>
    <base href="<?=base_url()?>">
    <link rel="stylesheet" href="plugin/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="css/style.css">
</head>

<body>
<?php require_once(VIEWPATH.'include/header.html');?>
<!-- 主内容区域 -->
<div class="container-fluid iframe-container">
    <?php require_once(VIEWPATH.'include/sidebar.html');?>
    <!-- 主面板 -->
    <div class="iframe-main">
        <div class="iframe-main-sidebar">
            <div class="panel">
                <?=$main_sidebar?>
            </div>
        </div>
        <div class="iframe-main-section">
            <div class="section_container">
                <div class="panel">
                    <div class="panel-heading">
                        <div class="panel-title"><?=$main_section_name?></div>
                    </div>
                    <form class="form-horizontal ajax-form-hook" action="<?=$save_url?>"
                          method="post">
                        <div class="panel-body">
                            <input type="hidden" name="cid" value="<?=$record['id']?>">
                            <div class="form-group">
                                <div class="col-xs-2 control-label">名称</div>
                                <div class="col-xs-3">
                                    <input type="text" name="name" value="<?=$record['name']?>" class="form-control"
                                           disabled>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-2 control-label">内容</div>
                                <div class="col-xs-8">
                                    <script id="content" class="ueditor-hook" name="content"
                                            type="text/plain"><?=$record['content']?></script>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-2 control-label">发布时间</div>
                                <div class="col-xs-3">
                                    <input type="text" name="create_time"
                                           value="<?=$create_time?>"
                                           class="form-control datetime-hook">
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-xs-offset-2 col-xs-8">
                                    <?=$save_btn?>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="plugin/require.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript">
    require(['unit'], function (unit) {
        unit.ueditor();
        unit.datetime();
        unit.ajaxForm();
    })
</script>
</body>

</html>
